﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>用户登录</title>   
    <meta content="width=device-width, initial-scale=1" name="viewport" />     
    <!-- BEGIN GLOBAL MANDATORY STYLES -->    
    <link href="../../Content/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
    <!-- END GLOBAL MANDATORY STYLES -->
    <!-- BEGIN PAGE LEVEL PLUGINS -->
    <link href="../../Content/assets/global/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/assets/global/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- END PAGE LEVEL PLUGINS -->
    <!-- BEGIN THEME GLOBAL STYLES -->
    <link href="../../Content/assets/global/css/components.min.css" rel="stylesheet" id="style_components" type="text/css" />
    <link href="../../Content/assets/global/css/plugins.min.css" rel="stylesheet" type="text/css" />
    <!-- END THEME GLOBAL STYLES -->
    <!-- BEGIN PAGE LEVEL STYLES -->
    <!--<link href="../../Content/assets/pages/css/login.min.css" rel="stylesheet" type="text/css" />-->
    <link href="../../Content/assets/pages/css/login.css" rel="stylesheet" type="text/css" />
    
    <!--自定义js引用-->
    <script src="../../Scripts/jquery-1.10.2.min.js"></script>
    <script src="../../Scripts/common.js"></script>
    <script src="../../Scripts/CryptoJS/core-min.js"></script>
    <script src="../../Scripts/CryptoJS/enc-base64-min.js"></script>

    <style type="text/css">
    </style>
</head>
<!-- END HEAD -->

<body class="login">
    <!-- BEGIN LOGO -->
    <div class="logo">
        <!--<img src="../../Content/assets/pages/img/logo-big.png" alt="" />-->
    </div>
    <!-- END LOGO -->
    <!-- BEGIN LOGIN -->
    <div class="content" >
        <!-- BEGIN LOGIN FORM -->
        <!--<form class="login-form" action="/Home/Login" method="post">-->
        <h3 class="form-title font-green">幼儿园管理登录</h3>
        <div class="form-group">
            <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
            <label class="control-label visible-ie8 visible-ie9">手机号</label>
            <input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" value="15082364816" placeholder="手机号" id="username" />
        </div>
        <div class="form-group">
            <label class="control-label visible-ie8 visible-ie9">密码</label>
            <input class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" value="123456" placeholder="密码" id="password" />
        </div>
        <div id="tsMsg" style="position:relative;z-index:9;height:20px;font-size:9px;color:red;margin-top:-10px;">
            <!--提示消息-->
        </div>
        <div class="form-actions" style="margin-top:-20px;">
            <button type="button" onclick="login()" class="btn" style="width:100%;background:#00EC00;color:white;border:0;cursor:pointer;">登录</button>
        </div>
        @*<div style="text-align:center;">
            <a>注册账号</a>&nbsp;&nbsp;&nbsp;<a>忘记密码</a>
        </div>*@
        <!--</form>-->
    </div>
    <div class="copyright"> @DateTime.Now.Year © 勤道科技. </div>

    <!-- BEGIN CORE PLUGINS -->
    <script src="../../Content/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/js.cookie.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
    <!-- END CORE PLUGINS -->
    <!-- BEGIN PAGE LEVEL PLUGINS -->
    <script src="../../Content/assets/global/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/jquery-validation/js/additional-methods.min.js" type="text/javascript"></script>
    <script src="../../Content/assets/global/plugins/select2/js/select2.full.min.js" type="text/javascript"></script>
    <!-- END PAGE LEVEL PLUGINS -->
    <!-- BEGIN THEME GLOBAL SCRIPTS -->
  
    <script src="../../Content/assets/global/scripts/app.min.js" type="text/javascript"></script>
    <!-- END THEME GLOBAL SCRIPTS -->
    <!-- BEGIN PAGE LEVEL SCRIPTS -->
    <script src="../../Content/assets/pages/scripts/login.min.js" type="text/javascript"></script>
  
    <script type="text/javascript">
        window.onload = function () {
            $("#username").focus();
        }
        $(document).keyup(function (event) {
            if (event.keyCode == 13) {
                login();
            }
        });
        function login() {
            //var username = $("#username").val().trim();
            //var password = $("#password").val().trim();
            var username = $("#username").val();
            var password = $("#password").val();
            if (username == "") {
                $("#tsMsg").html("请输入账户");
                return;
            }
            if (password == "") {
                $("#tsMsg").html("请输入密码");
                return;
            }
            AjaxCustom({
                url: "/Login/CheckLogin",
                type: "post",
                parames: { UserName: username, Password: password },
                callBack: function (data) {
                    if (data.code == "1") {
                        AlertMsg("登录成功");
                        window.location.href = "/Home/Index";
                    }
                    else if (data.code == "2") {
                        $("#tsMsg").html("用户名或密码错误");
                    }
                    else if (data.code == "3") {
                        $("#tsMsg").html("没有登录权限");
                    }
                    else if (data.code == "4") {
                        $("#tsMsg").html("当前账号被禁用");
                    }
                    else if (data.code == "5") {
                        $("#tsMsg").html("无效账户");
                    }
                    else if (data.code == "6") {
                        AlertMsg("欢迎管理员");
                        window.location.href = "/Home/YEYManage";
                    }
                    else if (data.code == "22") {
                        $("#tsMsg").html("用户名不能为空");
                    }
                    else if (data.code == "33") {
                        $("#tsMsg").html("密码不能为空");
                    }
                }
            });
        }

    </script>
</body>
</html>